package com.xjscrm.server.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xjscrm.common.entity.WwCustomer;
import com.xjscrm.common.entity.WwCustomerTagsUserid;
import com.xjscrm.server.dto.wwcustomer.WwCustomerQuery;
import com.xjscrm.server.dto.wwcustomertagsuserid.WwCustomerTagsUseridQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface WwCustomerTagsUseridMapper {

    int deleteById(@Param("id") Long id);

    int deleteByDeviceUniqueId(@Param("deviceUniqueId") Long deviceUniqueId);

    int deleteByCustomId(@Param("customerId") Long customerId);

    int insert(WwCustomerTagsUserid record);

    int insertSelective(WwCustomerTagsUserid record);

    WwCustomerTagsUserid selectById(Long id);

    WwCustomerTagsUserid queryByDeviceUniqueId(@Param("deviceUniqueId") Long deviceUniqueId);

    WwCustomerTagsUserid queryByDeviceUniqueIdAndTagName(@Param("deviceUniqueId") Long deviceUniqueId, @Param("tagName") String tagName);

    WwCustomerTagsUserid queryByDeviceUniqueIdAndCustomerId(@Param("deviceUniqueId") Long deviceUniqueId, @Param("customerId") Long customerId);

    int updateByIdSelective(WwCustomerTagsUserid record);

    int updateById(WwCustomerTagsUserid record);

    /**
     * 分页查询
     *
     * @param query
     * @param query
     * @return
     */
    Integer findCount(@Param("query") WwCustomerTagsUseridQuery query);
}